# 路径配置
import os

# 修改BASE_DIR定义，使其指向项目根目录
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))


# 全局通用配置
class Config(object):
  db_url = "mysql+pymysql://admin:123456@localhost:3306/mumushouji"

# 测试环境配置
class TestConfig(Config):
  if_echo = True
  LOG_LEVEL = "DEBUG"

# 生产环境配置
class ProductionConfig(Config):
  if_echo = False
  LOG_LEVEL = "INFO"
  
config = {
  "test": TestConfig,
  "production": ProductionConfig
}